SUBROUTINE FORM3
* Create a simple form containing 2 edit boxes and 2 text areas* using RWS_FORM*Include the RealWeb definitions
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
* Start the HTML page.* Display the text 'Send a Message' in the browser's title bar.CALL RW_START_HTML_PAGE("Send a Message", "", "", "", "")*Set up the size and initial content of the text area
ROWS=12
COLS=40
CLASS=""
CONTENT="Type your message here"
*Build the contents of the form
BUF="To: "
CALL RWA_EDIT_BOX(BUF,"TO",30,"")CALL RWA_NEWLINES(BUF,2)
BUF=BUF:"Subject: "
CALL RWA_EDIT_BOX(BUF,"SUBJECT",30,"")CALL RWA_NEWLINES(BUF,2)CALL RWA_TEXT_AREA(BUF,"MESSAGE",ROWS,COLS,CONTENT,CLASS)CALL RWA_SUBMIT_BUTTON(BUF,"SEND","")*Generate the form, specifying that this subroutine*should be run again when the form is submittedCALL RWS_FORM(BUF,"FORM3","RWS_FORM","")*Display the formCALL RW_PUT(BUF)
RETURN
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META NAME="Generator" CONTENT="Reality"><TITLE>Send a Message</TITLE></HEAD><BODY><FORM ACTION="FORM3" NAME="RWS_FORM" METHOD="POST">To: <INPUT NAME="TO" SIZE="30" TYPE="TEXT"><BR><BR>
Subject: <INPUT NAME="SUBJECT" SIZE="30" TYPE="TEXT"><BR><BR><TEXTAREA NAME="MESSAGE" COLS="40" ROWS="12">Type your message here</TEXTAREA><INPUT TYPE="submit" VALUE="SEND"></FORM></BODY></HTML>